package cmpe451.group7.ourcity.dao;

import java.util.List;

import cmpe451.group7.ourcity.entity.Tag;
import cmpe451.group7.ourcity.entity.TagSimilarity;

/**
 * This DAO is used to enter & query the similar pairs to the database
 */
public interface TagSimilarityDAO extends GenericDAO<TagSimilarity> {

	/**
	 * Check if similar tags of the given tag is already in the database.
	 * 
	 * This is created since if there exists any similar pairs, similarity query
	 * is not sent to the server
	 * 
	 * @param tag
	 * @return
	 */
	public boolean hasSimilarity(Tag tag);

	/**
	 * This is used to retrieve the similar tags of a tag
	 * 
	 * @param mid1
	 * @return
	 */
	public List<TagSimilarity> findByMID1(String mid1);

	/**
	 * This is used to get all similar tags of a tag.
	 * 
	 * If there isn't any in the database, database is filled with similar tags
	 * first
	 * 
	 * @param tags
	 * @return
	 */
	public List<Tag> getAllSimilarTags(List<Tag> tags);
}
